<script>
    layui.use(['jquery','table','upload','layer','element','form','laydate'],function () {
        var $ = layui.$, table = layui.table, form = layui.form,
            layer = layui.layer, laydate = layui.laydate,upload = layui.upload;
        laydate.render({elem:'#miaosha_start',type:'datetime',format:"yyyy-MM-dd HH:mm:ss"});
        laydate.render({elem:'#miaosha_end',type:'datetime'});
        laydate.render({elem:"#hexiao_end",type:"datetime"});

        //数据表格实例化
        var tbWidth = $("#tableRes").width();
        var layTableId = "layTable";
        var tableIns = table.render({
            elem: '#dataTable',
            id: layTableId,
            data: viewObj.tbData,
            width: tbWidth,
            page: false,
            loading: true,
            even: false, //不开启隔行背景
            cols: [[
                {title: '序号', type: 'numbers'},
                {field: 'title', type: "string", title: '规格名称',edit:"text"},
                {field: 'origin_price', type: "float", title: '原价',edit:"text"},
                {field: 'sold_price', type: "float", title: '售价',edit:"text"},
                {field: 'stock', title: '库存',edit:"text"},
                {field: 'id', title: '操作', templet: function(d){
                    return '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del" lay-id="'+ d.id +'"><i class="layui-icon layui-icon-delete"></i>移除</a>';
                }}
            ]],
            done: function (res, curr, count) {
                viewObj.tbData = res.data;
            }
        });
    })
</script>
<link href="/baidu-editor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
<script src="/baidu-editor/third-party/jquery.min.js"></script>
<!-- 配置文件 -->
<script type="text/javascript" src="/baidu-editor/umeditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/baidu-editor/umeditor.min.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UM.getEditor('container');
</script>
